import React, { Component } from 'react'
import qs from 'querystring'

export default class Details extends Component {
  render() {
    console.log(this.props);
    // params参数
    // const { id, title } = this.props.match.params || {}
    // search参数
    // const { search } = this.props.location
    // const { id, title } = qs.parse(search.slice(1)) || {};
    // state参数
    const { id,title } = this.props.location.state || {}
    return (
      <ul>
        <li>ID:{id}</li>
        <li>Message:{title}</li>
        <li>Count:xxx</li>
      </ul>
    )
  }
}
